package com.qf.openapi.web.master.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.HashMap;
import java.util.Map;

@Controller
@RequestMapping("/test")
public class TestController {
    @RequestMapping("/test1")
    public String test1(){
        System.out.println("test test1");
        return "/test.html";
    }
    @RequestMapping("/test2")
    @ResponseBody
    public Map<String,String> test2(){
        System.out.println("test test2");
        final HashMap<String,String> hashMap = new HashMap<>();
        hashMap.put("code","1");
        hashMap.put("msg","ok");
        return hashMap;
    }
}
